import type { PlusColumn } from 'plus-pro-components'

export function useForm() {
    const schema: PlusColumn[] = [

        {
            colProps: {
                span: 6,
            },
            label: '短信分类',
            options: [
                {
                    label: '好房',
                    value: 'HAOFANG',
                },
                {
                    label: '保障房',
                    value: 'BAOZHANGFANG',
                },
                {
                    label: '政策',
                    value: 'ZHENGCE',
                },
                {
                    label: '登录',
                    value: 'DENGLU',
                },
            ],
            prop: 'scene',
            valueType: 'select',
        },
        {
            colProps: {
                span: 6,
            },
            label: '状态',
            options: async () => [
                {
                    label: '全部',
                    value: '',
                },
                {
                    label: '启用',
                    value: 0,
                },
                {
                    label: '禁用',
                    value: -1,
                },
            ],
            prop: 'status',
            valueType: 'select',
        },
    ] as const

    const form = ref({
        channel: 'SMS',
        order: 'desc',
        scene: '',
        sort_by: 'create_time',
        status: '',
    })
    return { form, schema }
}
